package com.lm.upms.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.lm.common.core.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 菜单权限关联表
 *
 * @author lm
 * @date 2019/5/31
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class SysMenu extends BaseEntity<SysMenu> {

    /**
     * 菜单ID
     */
    @TableId(value = "menu_id", type = IdType.INPUT)
    private Integer menuId;

    /**
     * 菜单名称
     */
    @NotBlank(message = "菜单名称不能为空")
    private String menuName;

    @NotNull(message = "菜单父ID不能为空")
    private Integer parentId;

    private Integer orderNum;

    private String url;

    private String path;

    private String component;

    private String menuPath;

    private String menuComponent;

    /**
     * 菜单类型 （M-目录 C-菜单 F-按钮）
     */
    @NotNull(message = "菜单类型不能为空")
    private String menuType;

    private String visible;

    /**
     * 删除标志
     */
//    @TableLogic
//    private String delFlag;

    /**
     * 菜单权限标识
     */
    private String perms;

    /**
     * 图标
     */
    private String icon;

}